import React from 'react';
import {Link , State} from 'react-router';
import ReactMixin from 'react-mixin';

export default class RouterLink extends React.Component {

	construct() {
		super()
	}

	render() {
		var isActive = this.isActive(this.props.to, this.props.params, this.props.query);
		var activeClassName = isActive ? 'am-active' : '';
		return (
	     	<li className={activeClassName}>
				<Link {...this.props} />
			</li>;
		);
	}
}

ReactMixin(RouterLink.prototype , State);
